<%--
   zTree Selector
   Copyright (c) 2013 ISPERP
   Version : 1.0.0
 --%>
<%@ tag language="java" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<%@ attribute name="buttonListId" required="false" rtexprvalue="true"
	type="java.lang.String" description=" 按钮 栏目的Id"%>

<%@ attribute name="dialogId" required="false" rtexprvalue="true"
	type="java.lang.String" description=" 需要关闭的窗口id，默认为wijmo-dialog"%>


<%@ attribute name="emptyDialog" required="false" rtexprvalue="true"
	type="java.lang.Boolean" description=" 默认关闭后是否清空对话框中内容，默认为true"%>
<%@ attribute name="showCloseBtn" required="false" rtexprvalue="true"
	type="java.lang.Boolean" description=" 是否显示默认的关闭按钮，默认为true"%>


<c:set var="emptyDialog" value="${emptyDialog eq false? false : true}" />

<div style="clear: both;height:50px"></div>
<div class="divider"></div>
<div class="clear"></div>
<div id="${buttonListId }" class="actions button-list" style="height:auto;">
	<div style="clear:both;text-align: right;padding:0 10px">
		<div style="height:3px;"></div>
		<jsp:doBody /><c:if
			test="${ empty showCloseBtn or  showCloseBtn  eq true }">
			<button type="button" id="closeWinBtn"
				onclick="closeWin()">
				关闭</button>
		</c:if>
		<div style="float:none;width:5px;height:10px;display: inline-block;"></div>
	</div>
</div>
<script type="text/javascript">
function closeWin()
{
  if(isperp.getUrlParamByName("pcontrolid")!=undefined)
      isperp.reloadParentControl(isperp.getUrlParamByName("pcontrolid"));
  isperp.closeDialog({id:'${dialogId}',empty:${emptyDialog }});
}

</script>
